<template>
  <div @click="Signin()" class="Signin-btn">
    <CommonButton title="注册" />
  </div>
</template>

<script>
import CommonButton from './CommonButton.vue'

import { UseLoginStore } from '../../stores/request'
import { bus } from '../../utils/utils'
export default {
  name: 'SignInButton',
  components: {
    CommonButton
  },
  setup() {
    const LoginStore = UseLoginStore()
    function Signin() {
      LoginStore.SignIn((status) => {
        if (status === 400) {
          bus.emit('errStyle', 'email')
        }
      })
    }
    return {
      Signin
    }
  }
}
</script>

<style lang="scss" scoped>
.Signin-btn {
  background-color: $primary;
}
</style>
